<!--
 * @Author: mayating mayating@xinchan.com.cn
 * @Date: 2024-06-26 10:45:48
 * @LastEditors: mayating mayating@xinchan.com.cn
 * @LastEditTime: 2024-06-26 18:57:51
 * @FilePath: /wuniubi/src/App.vue
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
<template>
  <div id="app" :class="flags ? 'dark-theme' : ''">
    <HeaderView @changeFlag="changeFlag"></HeaderView>
    <router-view></router-view>
    <FooterView></FooterView>
    <!-- {{ $store.state.app.detail }} -->
  </div>
</template>

<script>
// import { getCompany } from '@/api/company/company.js'
import FooterView from "@/views/footer/index.vue";
import HeaderView from "@/views/header/index.vue";
export default {
  name: "App",
  components: {
    FooterView,
    HeaderView,
  },
  data() {
    return {
      flags: false,
      detail: {
        id: 1
      }
    };
  },
  mounted(){
    this.getData()
  },
  methods: {
    changeFlag() {
      this.flags = !this.flags;
    },
    getData() {
      this.$store.dispatch('app/setBasic')
      // getCompany(1).then((res) => {
      //   console.log(res);
      //   this.detail = res.data
      // })
      // console.log(store.state.detail, 'store.state.detail')
    }
  },
};
</script>

<style scoped>

</style>
